package com.yj.provider.service;

import com.yj.provider.dynamicDataSource.DataSourceChoose;
import com.yj.provider.dynamicDataSource.DataSourceType;
import com.yj.provider.mapper.RoleMapper;
import com.yj.provider.pojo.Role;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RoleServiceImpl implements RoleService {

    @Autowired
    RoleMapper roleMapper;

    @Override
    @DataSourceChoose(DataSourceType.DB_PROD)
    public List<Role> findAll() {
        return roleMapper.findAll();
    }
}
